package com.pet.user.controller.v1;


import com.pet.model.common.dtos.ResponseResult;
import com.pet.model.user.dtos.UserRelationDto;
import com.pet.model.user.pojos.ApUserFollow;
import com.pet.user.service.ApUserFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* <p>
* APP用户关注信息表 控制器</p>
*/
@RestController
@RequestMapping("/api/apUserFollow")
public class ApUserFollowController {

    @Autowired
    private ApUserFollowService apUserFollowService;

    @PostMapping("user_follow")
    public ResponseResult userFollow(@RequestBody UserRelationDto dto){
        return apUserFollowService.userFollow(dto);
    }

    /**
     * 查询用户关注记录
     */
    @GetMapping("getUserFollow")
    public ResponseResult<ApUserFollow> getUserFollow(@RequestParam("userId")Integer userId, @RequestParam("followId")Integer followId){
        return apUserFollowService.getUserFollow(userId,followId);
    }
}

